{{define "title"}}主题 {{end}}
{{define "content"}}
<div class="row">
	<div class="col-md-9 col-sm-6">
		<div class="sep20"></div>
		<div role="presentation" class="pull-right" style="padding: 8px 15px;"><a href="/pkgdoc">查看标准库中文版</a></div>
		<ol class="breadcrumb">
			<li><a href="/">首页</a></li>
			<li class="active">主题</li>
		</ol>
		<div class="box_white">
			<div class="inner_content" style="border-top-left-radius: 3px; border-top-right-radius: 3px;border-bottom: 1px solid #e2e2e2;" id="Tabs">
				<a href="/topics?tab=all" class="{{if eq .tab "all"}}tab_current{{else}}tab{{end}}">全部</a>
				{{range .tab_list}}
				<a href="/topics?tab={{.ename}}" class="{{if eq .ename $.tab}}tab_current{{else}}tab{{end}}">{{.name}}</a>
				{{end}}
			</div>
		</div>
		{{include "topics/common_list.html" .}}
		<div class="sep20"></div>

		<div class="box_white nodes">
			<div class="title text-center"><h3 style="margin: 10px 0; padding: 0;">讨论节点分类导航</h3></div>
			<ul class="list-unstyled">
			{{range .nodes}}
				<li>
					{{range $parent, $children := .}}
					<label>{{$parent}}</label>
					<span class="childnodes">
						{{range $children}}
						<a href="/go/{{.ename}}?fr=topic_node" title="{{.name}}">{{.name}}</a>&nbsp;
						{{end}}
					</span>
					{{end}}
				</li>
			{{end}}
			</ul>
		</div>
	</div>
	<div class="col-md-3 col-sm-6">
		<div class="sep20"></div>

		{{include "common/my_info.html" .}}

		{{if .pos_ad.right1}}
		<div class="box_white sidebar" id="ad-right1">
			{{if eq .pos_ad.right1.AdType 0}}
				{{noescape .pos_ad.right1.Code}}
			{{end}}
		</div>
		{{end}}
		
		{{include "sidebar/hot_node.html" .}}

		{{include "sidebar/view_rank.html" (parseJSON `{"rank_title":"今日阅读排行","objtype":0,"limit":10,"rank_type":"today"}`)}}

		{{include "sidebar/view_rank.html" (parseJSON `{"rank_title":"一周阅读排行","objtype":0,"limit":10,"rank_type":"week"}`)}}
		
		{{if .pos_ad.right2}}
		<div class="box_white sidebar" id="ad-right2">
			{{if eq .pos_ad.right2.AdType 0}}
				{{noescape .pos_ad.right2.Code}}
			{{end}}
		</div>
		{{end}}
		
		{{include "sidebar/stat.html" .}}
		
	</div>
</div>
{{end}}
{{define "css"}}
{{end}}
{{define "js"}}
<script type="text/javascript">
// 需要加载的侧边栏
SG.SIDE_BARS = [
	"/resources/recent",
	"/comments/recent",
	"/articles/recent",
	"/nodes/hot",
	"/websites/stat",
	"/rank/view"
];
</script>

{{if .pos_ad.right1}}
	{{if eq .pos_ad.right1.AdType 1}}
		{{noescape .pos_ad.right1.Code}}
	{{end}}
{{end}}

{{end}}